package com.demo;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;

//如果这个类不再顶层包，需要加扫描路径
//@SpringBootApplication(scanBasePackages = {"com","com.test"})
//@EnableFeignClients(basePackages={"com"}) 

@SpringBootApplication // @SpringCloudApplication
@EnableDiscoveryClient
@EnableFeignClients
@EnableHystrix // 断路器
public class ApplicationMain {

	public static void main(String[] args) {
		// SpringApplication.run(ApplicationMain.class, args);
		new SpringApplicationBuilder(ApplicationMain.class).web(true).run(args);

	}
}
